package zyq;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestStudent {
    public static void main(String[] args) {
        ApplicationContext ac=
                new ClassPathXmlApplicationContext("applicationContext.xml");
        StudentDao dao=ac.getBean(StudentDao.class);
        Student stu=dao.findStuById("1");
        System.out.println(stu);
        System.out.println(stu.getTeacher());
    }
}